package com.kuson.springcloud.service.rpc;

import com.kuson.springcloud.domain.CommonResult;
import com.kuson.springcloud.service.rpc.impl.StorageServiceImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "seata-storage-service",fallback = StorageServiceImpl.class)
public interface StorageService {
    //远程的微服务 减库存的方法
    @RequestMapping("/storage/decrease")
    public CommonResult decrease(@RequestParam("productId") Long productId, @RequestParam("count") Long count);
}
